package com.caszx.chargingpile.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;

/**
 * Created by think on 2016/2/2.
 */
public class EntityStation implements Parcelable{

    public int fastRuningPile;//快速充电桩个数
    public float stopcarFee;//停车费
    public float serverFeeDc;//直流服务费
    public float serverFeeAc;//交流服务费
    public int slowRuningPile;//慢速充电桩个数
    public String stationId;
    public float beforeFee;//预约费
    public float priceDc;//直流电费
    public String address;
    public String name;
    public String longitude;
    public String latitude;
    public double distence;//距离
    public float priceAc;//交流电费

    public EntityStation(){};
    protected EntityStation(Parcel in) {
        fastRuningPile = in.readInt();
        stopcarFee = in.readFloat();
        serverFeeDc = in.readFloat();
        serverFeeAc = in.readFloat();
        slowRuningPile = in.readInt();
        stationId = in.readString();
        beforeFee = in.readFloat();
        priceDc = in.readFloat();
        address = in.readString();
        name = in.readString();
        longitude = in.readString();
        latitude = in.readString();
        distence = in.readDouble();
        priceAc = in.readFloat();
    }

    public static final Creator<EntityStation> CREATOR = new Creator<EntityStation>() {
        @Override
        public EntityStation createFromParcel(Parcel in) {
            return new EntityStation(in);
        }

        @Override
        public EntityStation[] newArray(int size) {
            return new EntityStation[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(fastRuningPile);
        dest.writeFloat(stopcarFee);
        dest.writeFloat(serverFeeDc);
        dest.writeFloat(serverFeeAc);
        dest.writeInt(slowRuningPile);
        dest.writeString(stationId);
        dest.writeFloat(beforeFee);
        dest.writeFloat(priceDc);
        dest.writeString(address);
        dest.writeString(name);
        dest.writeString(longitude);
        dest.writeString(latitude);
        dest.writeDouble(distence);
        dest.writeFloat(priceAc);
    }
}
